import time
def bubble_sort(mass):
    for i in range(len(mass)-1):
        for j in range(len(mass)-1):
            if mass[j] > mass[j+1]:
                mass[j], mass[j+1] = mass[j+1], mass[j] 
    return mass
 
def open_fil(name):
    with open(name+'.txt') as file:
        f = file.read().split('\n')
    print(f)
    tim = time.time()
    bubble_sort(f)
    print(f'{name} {(time.time()-tim)*1000} milliseconds')

open_fil('m1_sorted')
open_fil('m2_reverse')
open_fil('m1_shuffle')
